package com.tiancan.design.user.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/** @author tiancan */
@FeignClient(
    value = "login-service-code",
    fallback = CodeServiceFeignFallBack.class,
    path = "/code")
public interface CodeServiceFeignClient {

  /**
   * 验证验证码
   *
   * @param email 邮箱地址
   * @param code 验证码
   * @return 0,正确,1,错误,2,超时
   */
  @GetMapping("/validate/{email}/{code}")
  public Integer validate(@PathVariable("email") String email, @PathVariable("code") String code);
}
